←Select platform

DownloadDocument(ObjectCache,Uri,long,byte[],int,int) Method

Summary

Downloads the data of the specified document URI into an array.

Syntax
C#
VB
C++
public static int DownloadDocument( 
   ObjectCache cache, 
   Uri uri, 
   long offset, 
   byte[] data, 
   int dataOffset, 
   int dataLength 
) 
Public Shared Function DownloadDocument( 
   ByVal cache As ObjectCache, 
   ByVal uri As Uri, 
   ByVal offset As Long, 
   ByVal data() As Byte, 
   ByVal dataOffset As Integer, 
   ByVal dataLength As Integer 
) As Integer 
public:  
   static Int32 DownloadDocument( 
       ObjectCache^ cache, 
      Uri^ uri, 
      Int64 offset, 
      array<Byte>^ data, 
      Int32 dataOffset, 
      Int32 dataLength 
   ) 

Parameters

cache

The cache containing the document. This value cannot be null.

uri

The URI to document to download.

offset

0-based byte offset into the source data at which to begin reading the data.

data

Buffer to read the data into.

dataOffset

0-based byte offset into data at which to begin storing the data.

dataLength

The maximum number of bytes to read.

Return Value

The total number of bytes read into data. This can be less than the number of bytes requested by dataLength, if that many bytes are not currently available, or zero (0) if the end of the data has been reached.

Remarks

Similar to UploadDocument, data can be downloaded in chunks or all at once. Refer to Uploading Using the Document Library for detailed information on how to use these methods and the various options used.

GetDocumentCacheInfo can be used to determine if a document is in the cache and to get its information.

DownloadAnnotations can be used to download the annotations of a document (if any).

Example

For an example, refer to DownloadDocument(ObjectCache,string,long,int,Stream).

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly